﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using QuanLyBaoHiem.App_Code.Common.Utils;
using QuanLyBaoHiem.App_Code.Process;

namespace QuanLyBaoHiem.Screen
{
    public partial class frmDMLoaiHopDong : Form
    {
        LoaiHopDongProcess p = new LoaiHopDongProcess();
        public frmDMLoaiHopDong()
        {
            InitializeComponent();
        }

        private void frmDMLoaiHopDong_Load(object sender, EventArgs e)
        {
           

            ProjectUtils.SetStyleGrid(dtgvLoaiHopDong);
            //Load
            DataTable dtbLoaiHopDong = p.DanhSachLoaiHopDong();
            
            BindingSource bs = new BindingSource();
            bs.DataSource = dtbLoaiHopDong;
            bindingNavigatorLoaiHD.BindingSource = bs;

            if (dtbLoaiHopDong != null)
            {
                dtgvLoaiHopDong.DataSource = bs;
            }
            else
                dtgvLoaiHopDong.DataSource = p.CauTrucBangLoaiHopDong();

            
        }
    }
}
